package com.jprocms.module.cms.controller.admin.channel.vo;

import com.jprocms.module.cms.controller.admin.channel.dto.ChannelRuleDto;
import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 栏目 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ChannelBaseVO {

    @Schema(description = "栏目模型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "栏目模型ID不能为空")
    private Long modelId;

    @Schema(description = "内容模型ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "内容模型ID不能为空")
    private Long contentModelId;

    @Schema(description = "父栏目ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "1")
    @DiffLogField(name = "父栏目ID")
    private Long parentId;

    @Schema(description = "栏目名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "栏目名称")
    @DiffLogField(name = "栏目名称")
    private String name;

    @Schema(description = "访问路径", requiredMode = Schema.RequiredMode.REQUIRED, example = "news")
    @NotNull(message = "访问路径不能为空")
    @DiffLogField(name = "访问路径")
    private String path;

    @Schema(description = "工作流流程模型的最新部署的流程定义", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DiffLogField(name = "工作流")
    private String processDefinitionId;

    @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @DiffLogField(name = "排序")
    private Integer sort;


    @Schema(description = "外部链接", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "http://www.gov.cn")
    @DiffLogField(name = "外部链接")
    private String outLinkUrl;

    @Schema(description = "是否新窗口打开（0-否 1-是）", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @DiffLogField(name = "是否新窗口打开")
    private Boolean linkTarget;

    @Schema(description = "栏目页模板", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "/news/news.html")
    @DiffLogField(name = "栏目页模板")
    private String tplPc;

    @Schema(description = "手机栏目页模板", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "/news/news.html")
    @DiffLogField(name = "手机栏目页模板")
    private String tplMobile;

    @Schema(description = "手机内容页PC模板", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "/news/news.html")
    @DiffLogField(name = "手机内容页PC模板")
    private String contentTplPc;

    @Schema(description = "内容页手机模板", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "/news/news.html")
    @DiffLogField(name = "内容页手机模板")
    private String contentTplMobile;

    @Schema(description = "是否允许投稿（0-不允许  1-允许）", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "true")
    @NotNull(message = "是否允许投稿（0-不允许  1-允许）不能为空")
    @DiffLogField(name = "是否允许投稿")
    private Boolean contributeStatus;

    @Schema(description = "评论设置（0-不允许  1-允许）", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "true")
    @NotNull(message = "评论设置(0-不允许  1-允许)不能为空")
    @DiffLogField(name = "评论设置")
    private Boolean commentStatus;

    @Schema(description = "是否开启索引查询（0-不允许  1-允许）", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "true")
    @DiffLogField(name = "是否开启索引查询")
    private Boolean searchStatus;

    @Schema(description = "SEO标题", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "SEO标题")
    @DiffLogField(name = "SEO标题")
    private String seoTitle;

    @Schema(description = "SEO关键字", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "SEO关键字")
    @DiffLogField(name = "SEO关键字")
    private String seoKeyword;

    @Schema(description = "SEO描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "SEO描述")
    @DiffLogField(name = "SEO描述")
    private String seoDescription;

    @Schema(description = "分页大小", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
    @DiffLogField(name = "分页大小")
    @NotNull(message = "分页大小不能为空")
    private Integer pageSize;

    @Schema(description = "是否隐藏栏目", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @DiffLogField(name = "是否隐藏栏目")
    private Boolean listStatus;

    @Schema(description = "列表是否普通内容列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
    @DiffLogField(name = "列表是否普通内容列表")
    private Boolean listPage;

    @Schema(description = "列表图片", requiredMode = Schema.RequiredMode.NOT_REQUIRED, example = "列表图片")
    @DiffLogField(name = "列表图片")
    private String listImage;

    @Schema(description = "映射规则配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DiffLogField(name = "映射规则配置")
    private ChannelRuleDto collectRule;

    @DiffLogField(name = "富文本内容")
    @Schema(description = "富文本内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String txt;

}
